<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>商店</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../static/css/mui.min.css">
		<style>
			.mui-row.mui-fullscreen>[class*="mui-col-"] {
				height: 100%;
			}
			
			.mui-col-xs-3,
			.mui-control-content {
				overflow-y: auto;
				height: 100%;
			}
			
			.mui-segmented-control .mui-control-item {
				line-height: 40px;
				width: 100%;
			}
			
			.mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active {
				background-color: #fff;
			}
		</style>
	</head>

	<body>
<!-- 	<div class="mui-navbar-inner mui-bar mui-bar-nav">
		<h1 class="mui-center mui-title">店铺</h1>
	</div> -->
	<header class="mui-bar mui-bar-nav" style="height: 45px;">
		<!-- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a> -->
		<h1 class="mui-title">店铺</h1>
	</header>
	{{$Cates := .Categorys}}
	{{$Gds := .Goodsinfos}}
		<div class="mui-content mui-row mui-fullscreen" >
			<div class="mui-col-xs-3">
				<div id="segmentedControls" class="mui-segmented-control mui-segmented-control-inverted mui-segmented-control-vertical">
				{{range $k,$v := $Cates}}
					<a id="{{$v.Categoryid}}" class="mui-control-item" href="#content{{$v.Categoryid}}">{{$v.Name}}</a>
				{{end}}

				</div>
			</div>

			<div id="segmentedControlContents" class="mui-col-xs-9" style="border-left: 1px solid #c8c7cc;">
			{{range $k1,$v1 := $Gds}}
				<div id="content{{$k1}}" class="mui-control-content">
					<ul class="mui-table-view">
						{{range $v1}}
						<li class="mui-table-view-cell">
							<div class="mui-media">
								<a href="javascript:;">
									<img class="mui-pull-left" style="max-width:100px;height:100px;margin-right: 5px;" src="{{.Imgsrc}}" alt="展示图" />
									<div class="mui-media-body ">
										<h5 style="line-height:18px;color:black;font-weight:bold;"><span class="mui-ellipsis-2">{{.Name}}</span></h5>
										<h6 style="line-height:15px"><span class="mui-ellipsis-2">{{.Content}}</span></h6>
										<h5 style="color: red;"><span class="mui-ellipsis-2">售价：￥{{.Price}}</span></h5>
									</div>
								</a>
							</div>
						</li>
						{{end}}

					</ul>
				</div>
			{{end}}
			</div>
		</div>

		<script src="../static/js/mui.min.js"></script>
		<script>
			mui.init({
				swipeBack: false
			});
			var controls = document.getElementById("segmentedControls");
			var contents = document.getElementById("segmentedControlContents");
			controls.querySelector('.mui-control-item').classList.add('mui-active');
			contents.querySelector('.mui-control-content').classList.add('mui-active');
		</script>
	</body>

</html>